<?php include('./templete/public/header.php'); ?>
<title><?php echo $web['site_config']['site_title'].'_'; ?>编辑简历</title>
<link rel="stylesheet" type="text/css" href="__INDEX__/Mdate/needcss/Mdate.css"/>
<link rel="stylesheet" type="text/css" href="__INDEX__/district/css/LArea.css"/>

<!--日期插件-->
<script src="__INDEX__/datePicker/datePicker.js" type="text/javascript" charset="utf-8"></script>
<!--地区插件-->
<script src="__INDEX__/district/js/LArea.js" type="text/javascript" charset="utf-8"></script>
<script src="__INDEX__/district/js/LAreaData1.js" type="text/javascript" charset="utf-8"></script>
<script src="__INDEX__/district/js/LAreaData2.js" type="text/javascript" charset="utf-8"></script>
<body>
<header class="clearfix">
    <a class="fl header_return"><i class="iconzuojiantou1 iconfont">&#xe616;</i>返回</a>
    <a class="header_new">创建简历</a>
    <a class="fr header_more"><i class="iconmore iconfont">&#xe637;</i></a>
</header>
<div class="setup_container">
    <form action=" <?php echo url('jianli/qz') ;?> " method="post" enctype="multipart/form-data" id="user_form">
        <input type="hidden" name="id" value="<?php echo  $user_data['id'];?>">
        <div class="setup_photo">
            <i class="pr " id="localImag">

                <img id="preview" src="<?php if ($user_data['img_url']): ?><?php echo $user_data['img_url'];?><?php else: ?>__INDEX__/images/setup.jpg<?php endif ?>" width="100%" height="100%"  />
                <a class="iconfont iconxiangji">&#xe671;</a>
                <input type="file" name="img_url" id="doc" value="" class="setup_file"/>
            </i>
        </div>
        <div class="setup_photograph">
            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    简历名称
                </div>
                <input type="text" name="jname" id=""  value="<?php echo  $user_data['jname']?>" />
            </a>
            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>姓名
                </div>
                <input type="text" name="name" id=""  value="<?php echo  $user_data['name'];?>" />
            </a>
            <a class="setup_photograph_text clearfix bgnone">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>性别
                </div>
                <div class="fr radiobox">
						<span id="sexn" class="pr radio_contaier <?php echo $user_data['sex']==1?'yellow':'' ?>">
							<input type="radio" id="sexn" name="sex" value="1" <?php echo $user_data['sex']==1?'checked':'' ?>  />
							<span class="radio_people"><i class="iconfont people">&#xe8a5;</i>男</span>
						</span>
                    <span id="sexv" class="pr radio_contaier <?php echo $user_data['sex']==0?'yellow':'' ?>">
							<input type="radio" id="sexv" name="sex" value="0" <?php echo $user_data['sex']==0?'checked':'' ?> />
							<span class="radio_people"><i class="iconfont people">&#xe8a4;</i>女</span>
						</span>
                </div>
            </a>
          <!--  <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>英文名
                </div>
                <input type="text" name="en_name" id="" value="<?php /*echo  $user_data['en_name'];*/?>" />
            </a>-->
            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>出生年月日
                </div>
                <div class="begin-date">
                    <input type="text" name="birthday1" id="" value="<?php echo  ($user_data['birthday1'] != null)?$user_data['birthday1']:'2010';?>"/>
                    -
                    <input type="text" name="birthday2" id="" value="<?php echo  ($user_data['birthday2'] != null)?$user_data['birthday2']:'01';?>"/>
                  <!--  -
                    <input type="text" name="birthday3" id="" value="<?php /*echo  ($user_data['birthday3'] != null)?$user_data['birthday3']:'01';*/?>"/>-->
                </div>
            </a>
            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>最高学历
                </div>
                <input type="text" name="education" id=""  value="<?php echo  $user_data['education'];?>" />
            </a>
            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>微信
                </div>
                <input type="text" name="wechat" id=""  value="<?php echo  $user_data['wechat'];?>" />
            </a>
            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>工作年限
                </div>
                <input type="number" name="years" id=""  value="<?php echo  $user_data['years'];?>" />
            </a>
            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>资格证书
                </div>
                <input type="text" name="qualification" id=""  value="<?php echo  $user_data['qualification'];?>" />
            </a>
            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>手机
                </div>
                <input type="text" name="tel" id="tel" value="<?php echo  $user_data['tel'];?>" />
            </a>

            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>现居城市
                </div>
                <div class="content-block">
                    <input id="demo2" name="newaddress" type="text" readonly="" placeholder="城市选择"  value="<?php echo  $user_data['newaddress'];?>"/>
                    <input id="value2" type="hidden" value="20,234,504"/>
                </div>
            </a>

            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>EMAIL
                </div>
                <input type="text" name="email" id="email" value="<?php echo  $user_data['email'];?>" />
            </a>

            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>户籍城市
                </div>
                <div class="content-block">
                    <input id="demo1" name="address" type="text" readonly="" placeholder="城市选择"  value="<?php echo  $user_data['address'];?>"/>
                    <input id="value1" type="hidden" value="20,234,504"/>
                </div>
            </a>

            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>工作性质
                </div>
                <select style="width:500px;" name="gongzuoxingzhi">
                    <?php foreach($gongzuoxingzhi as $key=>$value): ?>
                        <option <?php if($user_data['gongzuoxingzhi']==$value): ?> selected <?php endif ?> value ="<?php echo $value ?>"><?php echo $value ?></option>
                    <?php endforeach; ?>
                </select>

              <!-- <input type="text" name="gongzuoxingzhi" placeholder="请输入工作性质" value="<?php /*echo  $user_data['gongzuoxingzhi'];*/?>" />-->
            </a>
            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>企业性质
                </div>
                <select style="width:500px;" name="qiyexingzhi">
                    <?php foreach($gongsixingzhi as $key=>$value): ?>
                        <option <?php if($user_data['qiyexingzhi']==$value): ?> selected <?php endif ?> value ="<?php echo $value ?>"><?php echo $value ?></option>
                    <?php endforeach; ?>
                </select>
               <!-- <input type="text" name="qiyexingzhi" placeholder="请输入企业性质" value="<?php /*echo  $user_data['qiyexingzhi'];*/?>" />-->
            </a>

            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>期望行业
                </div>
                <input type="text" name="xiwanghangye" placeholder="请输入期望行业" value="<?php echo  $user_data['xiwanghangye'];?>" />
            </a>

            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>目标地点
                </div>
                <input type="text" name="mubiaodidian" placeholder="请输入目标地点" value="<?php echo  $user_data['mubiaodidian'];?>" />
            </a>

            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>目标职位
                </div>
                <input type="text" name="mubiaozhiwei" placeholder="请输入目标职位" value="<?php echo  $user_data['mubiaozhiwei'];?>" />
            </a>

            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>期望薪资
                </div>
                <select style="width:500px;" name="daiyuyaoqiu">
                    <?php foreach($qiwangxinzi as $key=>$value): ?>
                        <option <?php if($user_data['daiyuyaoqiu']==$value): ?> selected <?php endif ?> value ="<?php echo $value ?>"><?php echo $value ?></option>
                    <?php endforeach; ?>
                </select>
               <!-- <input type="text" name="daiyuyaoqiu" placeholder="请输入期望薪资" value="<?php /*echo  $user_data['daiyuyaoqiu'];*/?>" />-->
            </a>


            <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>自我介绍
                </div>
                <input type="text" name="introduce" value="<?php echo  $user_data['introduce'];?>" />
            </a>


          <!--  <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>在读学校
                </div>
                <input type="text" name="school"  value="<?php /*echo  $user_data['school'];*/?>" />
            </a>-->
          <!--  <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>专业
                </div>
                <input type="text" name="specialty"  value="<?php /*echo  $user_data['specialty'];*/?>" />
            </a>-->
          <!--  <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>毕业时间
                </div>
                <div class="begin-date">
                    <input type="text" name="school_start1" id="" value="<?php /*echo  ($user_data['school_start1'] != null)?$user_data['school_start1']:'2010';*/?>" placeholder=""/>
                    /
                    <input type="text" name="school_start2" id="" value="<?php /*echo  ($user_data['school_start2'] != null)?$user_data['school_start2']:'09';*/?>"/>
                </div>
                -
                <div class="end-date">
                    <input type="text" name="school_end1" id="" value="<?php /*echo  ($user_data['school_end1'] != null)?$user_data['school_end1']:'2010';*/?>" placeholder=""/>
                    /
                    <input type="text" name="school_end2" id="" value="<?php /*echo  ($user_data['school_end2'] != null)?$user_data['school_end2']:'06';*/?>"/>
                </div>
            </a>-->
          <!--  <a class="setup_photograph_text clearfix ">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>每周工作天数
                </div>
                <input type="text" name="working_hours" value="<?php /*echo  $user_data['working_hours'];*/?>"  placeholder="（每周可兼职全天天数，包括双休）" />
            </a>-->
            <hr class="setup_gray"/>
            <div class="sx-experience">
                <?php if (!$user_data['shixi_start1']): ?>
                    <div class="append-content">
                        <a class="setup_photograph_text clearfix bordernone">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>在职时间
                            </div>

                            <div class="begin-date">
                                <input type="text" name="shixi_start1[]" id="" value="2010" placeholder="2010"/>
                                /
                                <input type="text" name="shixi_start2[]" id="" value="01" placeholder="01"/>
                            </div>
                            -
                            <div class="end-date">
                                <input type="text" name="shixi_end1[]" id="" value="2010" placeholder="2010"/>
                                /
                                <input type="text" name="shixi_end2[]" id="" value="01" placeholder="01"/>
                            </div>
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>公司名称
                            </div>
                            <input type="text" name="shixi_company[]" value="" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>公司行业
                            </div>
                            <input type="text" name="shixi_companyhangye[]" value="" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>任职部门
                            </div>
                            <input type="text" name="shixi_bm[]" value="" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>任职职位
                            </div>
                            <input type="text" name="shixi_zw[]" value="" />
                        </a>
                        <a class="setup_photograph_text clearfix ">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>税前待遇
                            </div>
                            <input type="text" name="shixi_daiyu[]" value="" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>工作描述
                            </div>
                            <textarea  name="shixi_gzmiaoshu[]"  rows="5" cols="65"  /></textarea>
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>离职原因
                            </div>
                            <input type="text" name="shixi_lizhiyuanyin[]" value="" />
                        </a>
                        <hr class="setup_gray"/>
                    </div>
                <?php else: ?>
                <?php foreach ($user_data['shixi_start1'] as $key => $o): ?>
                    <div class="append-content">
                        <a class="setup_photograph_text clearfix bordernone">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>工作经验
                            </div>
                            <div class="begin-date">
                                <input type="text" name="shixi_start1[<?php echo $key;?>]" id="" value="<?php echo  $user_data['shixi_start1'][$key];?>" placeholder="2010"/>
                                /
                                <input type="text" name="shixi_start2[<?php echo $key;?>]" id="" value="<?php echo  $user_data['shixi_start2'][$key];?>" placeholder="01"/>
                            </div>
                            -
                            <div class="end-date">
                                <input type="text" name="shixi_end1[<?php echo $key;?>]" id="" value="<?php echo  $user_data['shixi_end1'][$key];?>" placeholder="2010"/>
                                /
                                <input type="text" name="shixi_end2[<?php echo $key;?>]" id="" value="<?php echo  $user_data['shixi_end2'][$key];?>" placeholder="01"/>
                            </div>
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>公司名称
                            </div>
                            <input type="text" name="shixi_company[<?php echo $key;?>]" value="<?php echo  $user_data['shixi_company'][$key];?>" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>公司行业
                            </div>
                            <input type="text" name="shixi_companyhangye[<?php echo $key;?>]" value="<?php echo  $user_data['shixi_companyhangye'][$key];?>" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>任职部门
                            </div>
                            <input type="text" name="shixi_bm[<?php echo $key;?>]" value="<?php echo  $user_data['shixi_bm'][$key];?>" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>任职职位
                            </div>
                            <input type="text" name="shixi_zw[<?php echo $key;?>]" value="<?php echo  $user_data['shixi_zw'][$key];?>" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>税前待遇
                            </div>
                            <input type="text" name="shixi_daiyu[<?php echo $key;?>]"  value="<?php echo  $user_data['shixi_daiyu'][$key];?>" />
                        </a>
                        <a class="setup_photograph_text clearfix bordernone">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>工作描述
                            </div>
                            <textarea rows="5" cols="65"   name="shixi_gzmiaoshu[<?php echo $key;?>]"  /><?php echo  $user_data['shixi_gzmiaoshu'][$key];?></textarea>
                        </a>
                        <a class="setup_photograph_text clearfix bordernone">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>离职原因
                            </div>
                            <input type="text" name="shixi_lizhiyuanyin[<?php echo $key;?>]" value="<?php echo  $user_data['shixi_lizhiyuanyin'][$key];?>" />
                        </a>
                        <hr class="setup_gray"/>
                    </div>
                <?php endforeach ?>
            </div>
            <a class="add-btn jian" id="b_remove"><img src="__img__/jian.png" width="32px" height="32px"/></a>
            <?php endif ?>

            <a class="add-btn" id="b_add" ><img src="__img__/add.png" width="32px" height="32px"/></a>

            <hr class="setup_gray"/>
           <!-- <a class="setup_photograph_text clearfix bordernone">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>语言能力
                </div>
                <input type="text" name="languages" value="<?php /*echo  $user_data['languages'];*/?>" />
            </a>-->
           <!-- <a class="setup_photograph_text clearfix">
                <div class="setup_photograph_name fl">
                    <i class="red">*</i>求职意向
                </div>
                <input type="text" name="intention" value="<?php /*echo  $user_data['intention'];*/?>" />
            </a>-->

<!--            <a class="setup_photograph_text clearfix" --><?php //if ($user_data['otuijian']): ?><!-- style="display: none;"--><?php //endif ?><!-- >-->
<!--                <div class="setup_photograph_name fl">-->
<!--                    <i class="red"></i>推荐码-->
<!--                </div>-->
<!--                <input type="text" id="otuijian" name="otuijian" placeholder="没有推荐码可填万能码0001" value="--><?php //echo  $user_data['otuijian'];?><!--" />-->
<!--            </a>-->

            <!--教育培训经历-->

            <hr class="setup_gray"/>
            <div class="school-experience">
                <?php if (!$user_data['shixi_start1']): ?>
                    <div class="school-content">
                        <a class="setup_photograph_text clearfix bordernone">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>起始时间
                            </div>

                            <div class="begin-date">
                                <input type="text" name="xuexi_start1[]" id="" value="2010" placeholder="2010"/>
                                /
                                <input type="text" name="xuexi_start2[]" id="" value="01" placeholder="01"/>
                            </div>
                            -
                            <div class="end-date">
                                <input type="text" name="xuexi_end1[]" id="" value="2010" placeholder="2010"/>
                                /
                                <input type="text" name="xuexi_end2[]" id="" value="01" placeholder="01"/>
                            </div>
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>学校名称
                            </div>
                            <input type="text" name="school_name[]" value="" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>专业
                            </div>
                            <input type="text" name="school_zhuanye[]" value="" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>取得资质
                            </div>
                            <input type="text" name="school_zz[]" value="" />
                        </a>
                        <hr class="setup_gray"/>
                    </div>
                <?php else: ?>
                <?php foreach ($user_data['shixi_start1'] as $key => $o): ?>
                    <div class="school-content">
                        <a class="setup_photograph_text clearfix bordernone">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>教育培训经历
                            </div>
                            <div class="begin-date">
                                <input type="text" name="xuexi_start1[<?php echo $key;?>]" id="" value="<?php echo  $user_data['xuexi_start1'][$key];?>" placeholder="2010"/>
                                /
                                <input type="text" name="xuexi_start2[<?php echo $key;?>]" id="" value="<?php echo  $user_data['xuexi_start2'][$key];?>" placeholder="01"/>
                            </div>
                            -
                            <div class="end-date">
                                <input type="text" name="xuexi_end1[<?php echo $key;?>]" id="" value="<?php echo  $user_data['xuexi_end1'][$key];?>" placeholder="2010"/>
                                /
                                <input type="text" name="xuexi_end2[<?php echo $key;?>]" id="" value="<?php echo  $user_data['xuexi_end2'][$key];?>" placeholder="01"/>
                            </div>
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>学校名称
                            </div>
                            <input type="text" name="school_name[<?php echo $key;?>]" value="<?php echo  $user_data['school_name'][$key];?>" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>专业
                            </div>
                            <input type="text" name="school_zhuanye[<?php echo $key;?>]" value="<?php echo  $user_data['school_zhuanye'][$key];?>" />
                        </a>
                        <a class="setup_photograph_text clearfix">
                            <div class="setup_photograph_name fl">
                                <i class="red"></i>取得资质
                            </div>
                            <input type="text" name="school_zz[<?php echo $key;?>]" value="<?php echo  $user_data['school_zz'][$key];?>" />
                        </a>
                        <hr class="setup_gray"/>
                    </div>
                <?php endforeach ?>
            </div>
            <a class="add-btn jian" id="school_remove"><img src="__img__/jian.png" width="32px" height="32px"/></a>
        <?php endif ?>

            <a class="add-btn" id="school_add" ><img src="__img__/add.png" width="32px" height="32px"/></a>

            <hr class="setup_gray"/>

        </div>
            <a class="setup_photograph_text clearfix" style="background-image: none;overflow: visible;line-height: 22px;font-size: 12px;padding-top: 5px;">
                <div class="setup_photograph_name fl">
                    <i class="red"></i>
                </div>
                <b>完整填写简历，确认无误后请选择“发送简历”；<br>如暂不想发送，请选择'暂存简历”。谢谢！</b>
            </a>

        <input type="hidden" id="sub_type" name="sub_type" value="">
        <input type="hidden" name="__token__" value="<?php echo session('token') ?>" />
        <a class="setup_new" onclick="user_add(0)" href="javascript:;" style="border-right: 1px solid #fff;width: 50%">暂存简历</a>
        <a class="setup_new" onclick="user_add(1)" href="javascript:;" style="width: 50%;margin-left: 50%">发送简历</a>
    </form>

</div>
<hr style="height: 80px;border: none;">
<?php include('./templete/public/footer.php'); ?>

</body>

</html>
<!-- 防止页面后退（使浏览器后退按钮失效） -->
<!-- <script type="text/javascript">
    jQuery(document).ready(function ($) {
    	if (window.history && window.history.pushState) {
    		$(window).on('popstate', function () {
      　　  		window.history.forward(1);
    　　　　 });
  　　　}
　　});
　</script> -->
<script>

    function user_add(type) {
        document.getElementById("sub_type").value = type;
        var img_url = $("input[ name='img_url'] ").val();
        var preview = $("#preview")[0].src;
        var url_host =window.location.protocol+'//'+ window.location.host;
        if (preview == url_host+'/public/static/index/images/setup.jpg') {
            alert('请上传照片');
            return false;
        }

        var email = document.getElementById('email').value;
        var tel = document.getElementById('tel').value;
        var test_email = /\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/g;
        // var test_tel = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/;// 手机号码校验规则
        var test_tel = /^1[3456789]\d{9}$/;// 手机号码校验规则
        if (!test_email.test(email)) {
            alert('邮箱格式有误');
            return false;
        }
        if (!test_tel.test(tel)) {
            alert('手机号码格式有误');
            return false;
        }
        var name = $(" input[ name='name'] ").val();
        var birthday1 = $(" input[ name='birthday1'] ").val();
        var birthday2 = $(" input[ name='birthday2'] ").val();
      /*  var birthday3 = $(" input[ name='birthday3'] ").val();*/
        var address = $(" input[ name='address'] ").val();
        var newaddress = $(" input[ name='newaddress'] ").val();
        var education = $(" input[ name='education'] ").val();//最高学历
        var years = $(" input[ name='years'] ").val();//工作年限
        var introduce = $(" input[ name='introduce'] ").val();//自我介绍

            if (name  && birthday1 && birthday2 && address && newaddress  && education&& years && introduce ) {
                document.getElementById("user_form").submit();
            }else{
                alert('必填内容不能为空');
                return false;
            }
         }


    // $(".radio_contaier").click(function(){
    // 			$(this).addClass("yellow").siblings().removeClass("yellow");
    // 			$("input[type='radio'][id=sexn]").attr("checked","checked" );
    // 		})
    $("#sexn").click(function() {
        $("input[type='radio'][id=sexn]").attr("checked","checked" );
        $(this).addClass("yellow");
        $("#sexv").removeClass("yellow");
        $("input[type='radio'][id=sexv]").attr("checked",false );
    })
    $("#sexv").click(function() {
        $(this).addClass("yellow");
        $("#sexn").removeClass("yellow");
        $("input[type='radio'][id=sexv]").attr("checked","checked" );
        $("input[type='radio'][id=sexn]").attr("checked",false );
    })
    $(function() {
        //地区
        //弹出插件时隐藏软键盘
        $("#demo1").focus(function(){
            document.activeElement.blur();
        });
        var area1 = new LArea();
        area1.init({
            'trigger': '#demo1', //触发选择控件的文本框，同时选择完毕后name属性输出到该位置
            'valueTo': '#value1', //选择完毕后id属性输出到该位置
            'keys': {
                id: 'id',
                name: 'name'
            }, //绑定数据源相关字段 id对应valueTo的value属性输出 name对应trigger的value属性输出
            'type': 1, //数据源类型
            'data': LAreaData //数据源
        });
        area1.value=[1,15,3];//控制初始位置，注意：该方法并不会影响到input的value
        var area2 = new LArea();
        area2.init({
            'trigger': '#demo2',
            'valueTo': '#value2',
            'keys': {
                id: 'id',
                name: 'name'
            },
            'type': 1,
            'data': LAreaData //数据源
        });
        area2.value=[1,15,3];//控制初始位置，注意：该方法并不会影响到input的value


    });

    function load_more(){
        var html=	'<div class="append-content">'+
            '<a class="setup_photograph_text clearfix bordernone">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>工作经验'+
            '</div>'+
            '<div class="begin-date">'+
            '<input type="text" name="shixi_start1[]" id="" value="" placeholder="2010"/>'+
            '/'+
            '<input type="text" name="shixi_start2[]" id="" value="" placeholder="01"/>'+
            '</div>'+
            '--'+
            '<div class="end-date">'+
            '<input type="text" name="shixi_end1[]" id="" value="" placeholder="2010"/>'+
            '/'+
            '<input type="text" name="shixi_end2[]" id="" value="" placeholder="01"/>'+
            '</div>'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>公司名称'+
            '</div>'+
            '<input type="text" name="shixi_company[]" />'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>公司行业'+
            '</div>'+
            '<input type="text" name="shixi_companyhangye[]" />'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>任职部门'+
            '</div>'+
            '<input type="text" name="shixi_bm[]" />'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>任职职位'+
            '</div>'+
            '<input type="text" name="shixi_zw[]" />'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>税前待遇'+
            '</div>'+
            '<input type="text" name="shixi_daiyu[]" />'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>工作描述'+
            '</div>'+
            '<textarea  rows="5" cols="65"  name="shixi_gzmiaoshu[]" />'+
            '</div>'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>离职原因'+
            '</div>'+
            '<input type="text" name="shixi_lizhiyuanyin[]" />'+
            '</a>'+

            '<hr class="setup_gray"/>'+
            '<div/>';

        $(".sx-experience").append(html);
    }


    $('#b_add').on("click",function(){
        var company_length= $(".append-content").length;
       
        if(company_length>=2){

        }else{
            load_more();
        }

    })


    //教育经历追加
    function school_load_more(){
        var html=	'<div class="school-content">'+
            '<a class="setup_photograph_text clearfix bordernone">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>教育培训经历'+
            '</div>'+
            '<div class="begin-date">'+
            '<input type="text" name="xuexi_start1[]" id="" value="" placeholder="2010"/>'+
            '/'+
            '<input type="text" name="xuexi_start2[]" id="" value="" placeholder="01"/>'+
            '</div>'+
            '--'+
            '<div class="end-date">'+
            '<input type="text" name="xuexi_end1[]" id="" value="" placeholder="2010"/>'+
            '/'+
            '<input type="text" name="xuexi_end2[]" id="" value="" placeholder="01"/>'+
            '</div>'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>学校名称'+
            '</div>'+
            '<input type="text" name="school_name[]" />'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>专业'+
            '</div>'+
            '<input type="text" name="school_zhuanye[]" />'+
            '</a>'+
            '<a class="setup_photograph_text clearfix">'+
            '<div class="setup_photograph_name fl">'+
            '<i class="red"></i>取得资质'+
            '</div>'+
            '<input type="text" name="school_zz[]" />'+
            '</a>'+
            '<hr class="setup_gray"/>'+
            '<div/>';

        $(".school-experience").append(html);
    }


    $('#school_add').on("click",function(){
        var school_length= $(".school-content").length;
        if(school_length>=3){

        }else{
            school_load_more();
        }

    })

    $('#b_remove').on("click",function(){
        $(".append-content:last").remove();
    })
    $('#school_remove').on("click",function(){
        $(".school-content:last").remove();
    })
    $("input[name='img_url']").on('change',function(){
        var file = $(this).val();
        setImagePreview(file);
    });
    //实现实时预览的函数
    function setImagePreview(avalue) {
        var docObj = document.getElementById("doc");
        //img
        var imgObjPreview = document.getElementById("preview");
        //div
        var divs = document.getElementById("localImag");
        if (docObj.files && docObj.files[0]) {
            //火狐下，直接设img属性
            imgObjPreview.style.display = 'block';
            imgObjPreview.style.width = '100%';
            imgObjPreview.style.height = '100%';
            //imgObjPreview.src = docObj.files[0].getAsDataURL();
            //火狐7以上版本不能用上面的getAsDataURL()方式获取，需要一下方式
            imgObjPreview.src = window.URL.createObjectURL(docObj.files[0]);
        } else {
            //IE下，使用滤镜
            docObj.select();
            var imgSrc = document.selection.createRange().text;
            var localImagId = document.getElementById("localImag");
            //必须设置初始大小
            localImagId.style.width = "100%";
            localImagId.style.height = "100%";
            //图片异常的捕捉，防止用户修改后缀来伪造图片
            try {
                localImagId.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)"
                localImagId.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgSrc;
            } catch(e) {
                alert("您上传的图片格式不正确，请重新选择!");
                return false;
            }
            imgObjPreview.style.display = 'none';
            document.selection.empty();
        }
        return true;
    }
</script>
